package com.my.lab.activity;

import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.util.Log;
import android.view.ViewGroup.LayoutParams;

public class BingTuActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
//        setContentView(R.layout.main);
        
//        int[] colors =new int[]{Color.YELLOW,Color.RED,Color.BLUE,Color.GREEN};
//        int[] shade_colors = new int[]{Color.rgb(180, 180, 0),Color.rgb(180, 20, 10),Color.rgb(3, 23, 163),Color.rgb(15, 165, 0)};
        int[] colors =new int[]{Color.WHITE,0xadadad,Color.BLUE,Color.GREEN};
		int[] shade_colors = new int[]{Color.rgb(173, 173, 173),Color.rgb(255, 255, 255),Color.rgb(3, 23, 163),Color.rgb(15, 165, 0)};
	    
        for(int i=0;i<colors.length;i++){
        	Log.i("cat", "colors="+colors[i]+";;;shade_colors="+shade_colors[i]);
        	
        }
        
//        int[] percent = new int[]{90,270};
//        int[] percent = new int[]{(int) ((40.97/100)*360),(int) ((59.03/100)*360)};
        int i = (int) ((59.03/100)*360);
        int j = 360 - i;
        int[] percent = new int[]{j, i};
        System.out.println(percent[0]);
        System.out.println(percent[1]);
        PieView pieView = new PieView(this,colors,shade_colors,percent);
        PathView p = new PathView(this);
        
        setContentView(p,new LayoutParams(480,680));
    }
}